Media With Compression Plugin

Description

This plugin allows you to record audio with compression.

Discussion

The Media With Compression plugin, developed by Alpha Software, is a modified version of cordova-plugin-media that provides the ability to record and play back audio files on a mobile device. This plugin adds MPEG4 compression to both iOS and Android audio recording, making the recordings compatible for playback on either an iOS or Android device and within most modern browsers. MPEG4 compression typically results in a significant reduction in the recorded audio file size when compared to the stock Media plugin. The reduction in file size is required for efficient online/offline storage and retrieval of the audio files.

images/phonegapMedia.jpg

See GitHub: cordova-plugin-media-with-compression for the full documentation.

Methods

The following methods are available for use with this plugin:

Method
Description
pauseRecord()

Pause the current audio recording session in progress.

resumeRecord()

Resume audio recording with the existing session.

getRecordLevels()

Returns the averagePower and peakPower in dB (iOS) or an approximation of dB SPL (Android).

Changes in Media With Compression 2.2.1

The Media With Compression plugin version 2.2.1 update adds compatibility support for Android 10+.

Limitations

Android, iOS, Windows

See Also